import request from "@/utils/request.ts";
import Qs from 'qs'

// 文章列表
export function article() {
  return request({
    url: "/profile ",
    method: "get"
  });
}
// 请求数据data/main
export function getData(ids:string) {
  return request({
    url: "/data/get",
    params: { id: ids },
    method: "get",
  });
}
// 报警数量及报警信息
// 报警
export function pol() {
  return request({
    url: "/timer/sec",
    method: "get",
  });
}
// /history/num
export function historys(params:any) {
  return request({
    url: "/history/search",
    method: "get",
    params
  });
}
// /alarm/search
export function police(params:any) {
  return request({
    url: "/alarm/search",
    method: "get",
    params
  });
}
export function test(data:any) {
  return request({
    url: "/alarm/search",
    method: "post",
    data:Qs.stringify(data)
  });
}
// /insertElectricUpload 发送订单补录 接口

export function insertElectricUpload(data:any) {
  return request({
    url: "/test",
    method: "post",
    data:Qs.stringify(data)
  });
}
export function webRTC(url:string,data:any) {
  return request({
    url: url,
    method: "post",
    data:Qs.stringify(data)
  });
}
// export function insertElectricUpload(data:any) {
//   return request({
//     url: "/map/test",
//     method: "post",
//     data:Qs.stringify(data)
//   });
// }